package imnu.th.lock;

/**
 * @author: lys
 * @类名: Clinet
 * @Title:
 * @date: 2020/7/22
 **/
public class Client01 extends Thread {
    private Bank bank;
    private int want;

    public Client01(){}
    public Client01(String name, Bank bank){
        super(name);
        this.bank = bank;
    }

    @Override
    public void run() {
        this.bank.ask();
        try {
            Thread.sleep(500);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }


    public int getWant() {
        return want;
    }

    public void setWant(int want) {
        this.want = want;
    }

    public Bank getBank() {
        return bank;
    }

    public void setBank(Bank bank) {
        this.bank = bank;
    }
}
